package com.rd.student.ruanjian.class1.duhang.New00;

public class Lady {
    String name ;
    Animal pet;

    public Lady(String name, Animal pet) {
        this.name = name;
        this.pet = pet;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Animal getPet() {
        return pet;
    }

    public void setPet(Animal pet) {
        this.pet = pet;
    }

    @Override
    public String toString() {
        return "Lady{" +
                "name='" + name + '\'' +
                ", pet=" + pet +
                '}';
    }

    public void myPetEnjoy(){
        pet.voice();
    }
}
